You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-23Lines changed: 21 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,10 +35,10 @@ RegCensus API defines a number of dates depending on the series. For example, th
35
35
36
36
There are five helper functions to retrieve information about these key components of regdata. These functions provider the following information: document types, jurisdictions, series, agencies, and dates with data. The list functions begin with __list__.
37
37
38
-
Each document type comprises one or more *series*. The __list_series__ function returns the list of all series when no series id is provided.
38
+
Each document type comprises one or more *series*. The __list_series__ function returns the list of all series.
39
39
40
40
```
41
-
rc.list_series(jurisdictionID = 38)
41
+
rc.list_series()
42
42
```
43
43
44
44
Listing the jurisdictions is another great place to start. If you are looking for data for a specifc jurisdiction(s), this function
@@ -59,14 +59,22 @@ Use the __get_jurisdiction__ function to return a data frame with all the jurisd
59
59
rc.get_jurisdictions()
60
60
```
61
61
62
+
### DataFinder
63
+
64
+
Use the __get_datafinder__ function to return a data frame for a specific jurisdiction. It returns the following attributes in the data - `['jurisdiction', 'documentType', 'year', 'series', 'document_endpoints', 'summary_endpoints', 'label_endpoints']`
65
+
66
+
```
67
+
get_datafinder(jurisdiction = 38)
68
+
```
69
+
62
70
### Agencies
63
71
64
72
The __get_agencies__ function returns a data frame of agencies with data in RegData. Either the `jurisdictionID` or `keyword` arguments must be supplied. If `jurisdictionID` is passed, the data frame will include information for all agencies in that jurisdiction. If `keyword` is supplied, the data frame will include information for all agencies whose name contains the keyword.
65
73
66
74
The following code snippet will return data for all agencies in the Federal United States:
67
75
68
76
```
69
-
rc.get_agencies(jurisdiction = 38)
77
+
rc.get_agencies(jurisdictionID = 38)
70
78
```
71
79
72
80
Likewise, this code snippet will return data for all agencies (in any jurisdiction) containing the word "education" (not case sensitive):
@@ -84,38 +92,28 @@ The __get_industries__ function returns a data frame of industries with data in
84
92
The following line will get you industry information for all 4-digit NAICS industries:
85
93
86
94
```
87
-
rc.get_industries(codeLevel = 4)
95
+
rc.get_industries(labellevel = 4)
88
96
```
89
97
90
-
This line will get you information for the BEA industries:
98
+
This line will get you information for the BEA industries (this function is temporarily disabled as of 1.0.0):
91
99
92
100
```
93
-
rc.get_industries(standard = 'BEA')
101
+
rc.get_industries(labelsource = 'BEA')
94
102
```
95
103
96
-
Like the __get_agencies__ function, the `keyword` argument may also be used. The following code snippet will return information for all 6-digit NAICS industries with the word "fishing" in the name:
104
+
Like the __get_agencies__ function, the `keyword` argument may also be used. The following code snippet will return information for all 6-digit NAICS industries with the word "fishing" in the name (this function is temporarily disabled as of 1.0.0):
The __get_documents__ function returns a data frame with metadata for document-level data. The fucntion takes two parameters, jurisdictionID (required) and documentType (default value of 1, which is "all regulations").
105
-
106
-
The following line will get metadata for documents associated with U.S. Federal healthcare regulations.
The __get_values__ function is the primary function for obtaining RegData from the RegCensus API. The function takes the following parameters:
115
113
116
114
* jurisdiction (required) - value or list of jurisdiction IDs
117
115
* series (required) - value or list of series IDs
118
-
*date (required) - value or list of years
116
+
*year (required) - value or list of years
119
117
* agency (optional) - value or list of agencies
120
118
* industry (optional) - value of list of agencies
121
119
* dateIsRange (optional) - specify if the list of years provided for the parameter years is a range. Default is True.
@@ -130,15 +128,15 @@ The __get_values__ function is the primary function for obtaining RegData from t
130
128
In the example below, we are interested in the total number of restrictions and total number of words for the US (get_jurisdictions(38)) for the dates 2010 to 2019.
131
129
132
130
```
133
-
rc.get_values(series = [1,2], jurisdiction = 38, date = [2010, 2019])
131
+
rc.get_values(series = [1,2], jurisdiction = 38, year = [2010, 2019])
134
132
```
135
133
136
134
### Get all Values for a Country
137
135
138
-
The `country` argument can be used to get all values for one or multiple series for a specific national jurisdiction. The following line will get you a summary of the national and state-level restriction counts for the United States from 2016 to 2019:
136
+
The `country` argument can be used to get all values for one or multiple series for a specific national jurisdiction. The following line will get you a summary of the national and state-level restriction counts for the United States from 2016 to 2019 (this function is temporarily disabled as of 1.0.0):
0 commit comments